package exception;

public class ThrowsDemo {
    public static void main(String[] args) {
        System.out.println("程序进行了");
        try{Person p = new Person();
        p.setAge(50);
        System.out.println("年龄是"+p.getAge()+"岁");
        }catch (Exception e){
            System.out.println("程序出现了异常");
        }
        System.out.println("程序结束了");
    }
}
